package com.mounting.wechat.config;

import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author : lianghanmao
 * @date : 2022/11/17
 */
public class MvcConfig implements WebMvcConfigurer {

    /**
     * 添加首页配置
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        // 路径"/"-跳转到index
        registry.addViewController("/").setViewName("index");
        // 路径"/index"-跳转到index
        registry.addViewController("/index").setViewName("index");
    }
}
